package com.library.librarybackend.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author 平
 * @description 书籍VO
 * @since 2025-09-21 15:14
 */
@Data
public class BookVO {

    /**
     * 主键id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "主键id")
    private Long id;

    /**
     * 书名
     */
    @Schema(description = "书名")
    private String title;

    /**
     * 描述
     */
    @Schema(description = "描述")
    private String description;

    /**
     * 作者
     */
    @Schema(description = "作者")
    private String author;

    /**
     * 封面url
     */
    @Schema(description = "封面url")
    private String coverUrl;

    /**
     * 出版社
     */
    @Schema(description = "出版社")
    private String publisher;

    /**
     * 出版时间
     */
    @Schema(description = "出版时间")
    private Integer publishYear;

    /**
     * 下载次数
     */
    @Schema(description = "下载次数")
    private Integer downloadCount;

    /**
     * 阅读次数
     */
    @Schema(description = "阅读次数")
    private Integer readCount;

    /**
     * 分类
     */
    @Schema(description = "分类")
    private String category;

    /**
     * 标签
     */
    @Schema(description = "标签")
    private String tags;

    /**
     * 摘要
     */
    @Schema(description = "摘要")
    private String summary;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    /**
     * 书籍文件
     */
    @Schema(description = "书籍文件")
    private AttachmentVO bookFile;


}
